package com.hyhy.hycloud.uaa.service;

import com.hyhy.hycloud.uaa.security.exception.UserNotFoundException;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * Get User details By Username Finder
 *
 * @author Xuegui Yuan
 * @date 2018-09-19
 */
public interface UserDetailsByUsernameFinder {

    /**
     * 通过用户名获取用户详情
     *
     * @param appId    APP ID
     * @param username 邮箱
     * @return 用户详情
     * @throws UserNotFoundException 用户不存在异常
     */
    UserDetails findUserDetailsByUsername(String appId, String username) throws UserNotFoundException;
}
